package com.itheima.ip;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Demo01 {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress byName = InetAddress.getByName("127.0.0.1");

        System.out.println(byName.getHostName());
        System.out.println(byName.getHostAddress());
    }
}
